package com.ruoyi.user.controller.app;

import com.ruoyi.common.core.constant.constant.PathConstant;
import com.ruoyi.common.core.pojo.vo.MultiVO;
import com.ruoyi.common.core.result.Result;
import com.ruoyi.user.model.pojo.entity.Chum;
import com.ruoyi.user.service.IChumService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

@Tag(name = "App-密友关系配置", description = "App-密友关系配置")
@RestController
@RequestMapping(PathConstant.APP_PATH + "chum")
public class AppChumController {

    private final IChumService chumService;

    public AppChumController(IChumService chumService) {
        this.chumService = chumService;
    }

    @Operation(description = "列表", summary = "列表")
    @GetMapping("list")
    public MultiVO<Chum> list() {
        return Result.multi(chumService.lambdaQuery().orderByAsc(Chum::getId).list());
    }


}
